<template>
  <div>
    <table class="table table-bordered table-striped">
      <thead>
        <tr>
          <th scope="col">#</th>
          <th scope="col">姓名</th>
          <th scope="col">年龄</th>
          <th scope="col">名称</th>
          <th scope="col">商品详情</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(value, index) in userlist" :key="value.id">
          <th scope="row">{{ index + 1 }}</th>
          <td>{{ value.name }}</td>
          <td>{{ value.age }}</td>
          <td>{{ value.position }}</td>
          <td>
            <router-link :to="{ path: 'setting' }">详情</router-link>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userlist: [
        { id: 1, name: "嬴政", age: 18, position: "始皇帝" },
        { id: 2, name: "李斯", age: 35, position: "丞相" },
        { id: 3, name: "吕不韦", age: 50, position: "商人" },
        { id: 4, name: "赵姬", age: 48, position: "王太后" },
      ],
    };
  },
};
</script>
<style lang='less' scoped>
</style>
